﻿using System;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// ERP任务
    /// </summary>
    public class VErpTask : BaseVModel
    {
        private string _code = string.Empty;
        private string _remark = string.Empty;

        #region Public Property

        ///<Summary>
        /// 任务类型
        ///</Summary>
        public Enum.ErpTaskType TaskType { get; set; }

        ///<Summary>
        /// 箱号/组件编号
        ///</Summary>
        public string Code
        {
            get { return string.IsNullOrWhiteSpace(_code) ? string.Empty : _code; }
            set { _code = value; }
        }

        ///<Summary>
        /// 状态
        ///</Summary>
        public Enum.ErpTaskStatus Status { get; set; } = Enum.ErpTaskStatus.New;

        ///<Summary>
        /// 重试次数
        ///</Summary>
        public int RetryTimes { get; set; }

        ///<Summary>
        /// 最后重试时间
        ///</Summary>
        public DateTime? LastTryTime { get; set; }

        ///<Summary>
        /// 备注
        ///</Summary>
        public string Remark
        {
            get { return string.IsNullOrWhiteSpace(_remark) ? string.Empty : _remark; }
            set { _remark = value; }
        }
        #endregion
    }
}
